/**
*  Module
*
* Description
*/
angular.module('app', [])
.controller('videoController', ['$scope', function($scope){
	$scope.flag = true;
	$scope.startPlay = function(){
		//console.log($scope.temp);
		//console.log($scope.vid);
		$scope.vid.play();
		//$scope.flag = false;
	}


}])
.directive('dingyi',function(){
	return {
		  restrict : 'A', 
		  scope:false,
		  link: function(scope, iElm, iAttrs, controller) {
			//console.log(iElm[0].width);
			//console.log(scope.flag);
			scope.vid = iElm[0];
			iElm.bind('ended',function(){
			console.log(1234);
			scope.flag = true;
			console.log(scope.flag);
		})
			
		}
	};
});
